package com.mj.listen1._07AVL树;

import com.mj.listen1._07AVL树.printer.BinaryTrees;
import com.mj.listen1._07AVL树.tree.AVLTree;
import com.mj.listen1._07AVL树.tree.BinarySearchTree;

public class Main {
    // 测试删除完全二叉树
    static void test10() {
        Integer[] integer = new Integer[]{
                85, 19, 69, 3, 7, 99, 95
        };

        AVLTree<Integer> tree = new AVLTree<>();
        for (int i = 0; i < integer.length; i++) {
            tree.add(integer[i]);
        }

        BinaryTrees.println(tree);
        tree.remove(87);
        BinaryTrees.println(tree);
        tree.remove(55);
        BinaryTrees.println(tree);
    }

    public static void main(String[] args) {
        test10();
    }
}
